<template>
  <MSelect v-bind="{ ...config, ...$attrs }"></MSelect>
</template>

<script lang="ts" setup>
  import { ref } from 'vue';
  import { apiGetDictDataByType } from '@/api/system';
  import MSelect from '../MSelect/index.vue';

  // 选择特定渠道
  const config = ref({
    placeholder: '请选择',
    api: (params: any) => {
      return apiGetDictDataByType({
        dict_type: params.type,
      });
    },
    valueField: 'dict_value',
    labelField: 'dict_label',
  });
</script>
